<?php
namespace app\pgb\controller;
use x\Xbase;
class Base extends Xbase{
    public $userinfo = [];
    public $sys = [];
    public function __construct(){
        parent::__construct();
        clear_cookie_arr('js');
        $this->_sys();
        $this->_user();
    }

    //验证登陆
    public function _user(){
        $adminUser = m('AppThreeUser','c');
        $this->userinfo = $adminUser->isLogin();
        $this->assign('userinfo',$this->userinfo);
        if($this->c=='publics')
            return true;
        if(!$this->userinfo)
            r(url('publics/login'));
    }

    //通用
    public function _sys(){
        $this->sys = m('Deploy','xcom')->lists();
        $this->assign('sys',$this->sys);
    }

}
